import service from '@/utils/request'

// @Tags PageSetting
// @Summary 创建首页设置
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageSetting true "创建首页设置"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /pageSetting/createPageSetting [post]
export const createPageSetting = (data) => {
  return service({
    url: '/pageSetting/createPageSetting',
    method: 'post',
    data
  })
}

// @Tags PageSetting
// @Summary 删除首页设置
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageSetting true "删除首页设置"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /pageSetting/deletePageSetting [delete]
export const deletePageSetting = (params) => {
  return service({
    url: '/pageSetting/deletePageSetting',
    method: 'delete',
    params
  })
}

// @Tags PageSetting
// @Summary 批量删除首页设置
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除首页设置"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /pageSetting/deletePageSetting [delete]
export const deletePageSettingByIds = (params) => {
  return service({
    url: '/pageSetting/deletePageSettingByIds',
    method: 'delete',
    params
  })
}

// @Tags PageSetting
// @Summary 更新首页设置
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.PageSetting true "更新首页设置"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /pageSetting/updatePageSetting [put]
export const updatePageSetting = (data) => {
  return service({
    url: '/pageSetting/updatePageSetting',
    method: 'put',
    data
  })
}

// @Tags PageSetting
// @Summary 用id查询首页设置
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.PageSetting true "用id查询首页设置"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /pageSetting/findPageSetting [get]
export const findPageSetting = (params) => {
  return service({
    url: '/pageSetting/findPageSetting',
    method: 'get',
    params
  })
}

// @Tags PageSetting
// @Summary 分页获取首页设置列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取首页设置列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /pageSetting/getPageSettingList [get]
export const getPageSettingList = (params) => {
  return service({
    url: '/pageSetting/getPageSettingList',
    method: 'get',
    params
  })
}
